package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Insurancebill;
import cn.wolfcode.crm.query.ObjectQuery;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface InsurancebillMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Insurancebill record);

    Insurancebill selectByPrimaryKey(Long id);

    List<Insurancebill> selectAll();

    int updateByPrimaryKey(Insurancebill record);

    int queryForCount(ObjectQuery qo);

    List<Insurancebill> queryForList(ObjectQuery qo);

    void saveBillProductRelation(@Param("billId") Long id, @Param("productId") Long productId);

    void changState(@Param("billId") Long billId, @Param("state") int state);

    void deleteBillProductRelation(Long insurancebillId);


    void updateTempOddByInsuranceBillId(Insurancebill insurancebill);

    void updateAduitIdAndAduitTime(Insurancebill insurancebill);

    List<Insurancebill> checkWhichCompensate(@Param("id") Long id, @Param("state") int state);

    BigDecimal selectBillAccount();
}